* (bug 18716) Removed redundant class in Modern skin CSS for category links and
tweaked spacing.
* (bug 18656) Use proper directory separators in wfMkdirParents()
+* (bug 18549) Make Special:Blockip respect $wgEnableUserEmail and $wgSysopEmailBans
== API changes in 1.16 ==
* (bug 18730) Add version information to action=paraminfo output
* (bug 18743) Add ucprop=size to list=usercontribs
* (bug 18749) Add generator flag to action=paraminfo output
+* Make action=block respect $wgEnableUserEmail and $wgSysopEmailBans
=== Languages updated in 1.16 ===
* of success. If it fails, the result will specify the nature of the error.
*/
public function execute() {
- global $wgUser, $wgBlockAllowsUTEdit;
+ global $wgUser, $wgBlockAllowsUTEdit, $wgEnableUserEmail, $wgSysopEmailBans;
$params = $this->extractRequestParams();
if($params['gettoken'])
$this->dieUsageMsg(array('cantblock'));
if($params['hidename'] && !$wgUser->isAllowed('hideuser'))
$this->dieUsageMsg(array('canthide'));
- if($params['noemail'] && !$wgUser->isAllowed('blockemail'))
+ if($params['noemail'] && $wgEnableUserEmail && $wgSysopEmailBans && !$wgUser->isAllowed('blockemail'))
$this->dieUsageMsg(array('cantblock-email'));
$form = new IPBlockForm('');
const HIDEUSER_CONTRIBLIMIT = 1000;
public function __construct( $par ) {
- global $wgRequest, $wgUser, $wgBlockAllowsUTEdit;
+ global $wgRequest, $wgUser, $wgBlockAllowsUTEdit, $wgSysopEmailBans, $wgEnableUserEmail;
$this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) );
$this->BlockAddress = strtr( $this->BlockAddress, '_', ' ' );
$this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly', $byDefault );
$this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', $byDefault );
$this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', $byDefault );
- $this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false );
+ $this->BlockEmail = false;
+ if( $wgEnableUserEmail && $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
+ $this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false );
+ }
$this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false );
# Re-check user's rights to hide names, very serious, defaults to 0
$this->BlockHideName = ( $wgRequest->getBool( 'wpHideName', 0 ) && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0;
</tr>"
);
- global $wgSysopEmailBans, $wgBlockAllowsUTEdit;
- if( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
+ global $wgSysopEmailBans, $wgBlockAllowsUTEdit, $wgEnableUserEmail;
+ if( $wgEnableUserEmail && $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
$wgOut->addHTML("
<tr id='wpEnableEmailBan'>
<td> </td>